home *** CD-ROM | disk | FTP | other *** search
- Path: mudskipper.cac.psu.edu!user
- From: fcusack@tdx.org (frank.)
- Newsgroups: comp.lang.c
- Subject: Re: Question about C compiler
- Date: Wed, 17 Apr 1996 05:22:19 -0400
- Organization: Soylent Green is People!!
- Message-ID: <fcusack-1704960522190001@mudskipper.cac.psu.edu>
- References: <1996Apr16.175344.6042@lafn.org>
- NNTP-Posting-Host: mudskipper.cac.psu.edu
-
- In article <1996Apr16.175344.6042@lafn.org>, av871@lafn.org (Karl Chen) wrote:
-
- > In C and C++ ,there is a way to allocate and dealloacte memory
- > dynamically ( in C,using malloc() and free(),In C++,using new and delete)
-
- You just answered it yourself! That's exactly how you do it.
-
- > .I heard from a book that some compiler do not delete the pointer after
- > deallocation,is this true?Why they don't do this ? What about Boland C++
- > ? Can anyone give me a advice ?
-
- not true. After you call free/delete, the pointer is no longer valid, and
- the memory has been freed for later use (although not necessarily freed to
- the OS)
-
- ~Frank
- - Through the modem, past the router, over the firewall.. nothing but Net -
- - PGP ID: 1C0F6685 | NCB#56 | Visit me --> http://www.tdx.org/~fcusack/ -
-